package ubiqweb.spring3.service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import ubiqweb.spring3.dao.PaymentDao;
import ubiqweb.spring3.model.Payment;

@Service("paymentService")
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public class PaymentServiceImpl implements PaymentService {
	
	@Autowired
	private PaymentDao paymentDao;
	
	@Transactional
	public List<Payment> listPayments(){
		return paymentDao.listPayments();
	}	
	
	@Transactional
	public List<Payment> listPayments(String userId){
		return paymentDao.listPayments(userId);
	}	
}